package io.github.bigbird0101.datatransfer.model.config;

import io.github.bigbird0101.datatransfer.model.param.WriterParameters;
import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class ESWriterConfig extends WriterParameters {

    boolean isGreaterOrEqualThan7;
    private String username;
    private String password;
    private String index;
    private String type;
    private Integer trySize;
    private Long tryInterval;
    private Integer batchSize;
    private String splitter;
    private String actionType;
    private Map<String, Object> urlParams;
    private Boolean enableWriteNull;
    private Integer retryTimes;
    private Long sleepTimeInMilliSecond;
    private String fieldDelimiter;
    private boolean enableRedundantColumn;
    private String endpoint;
    private String column;
    private Integer timeout;

    private boolean truncate;

    private boolean discovery;
    private boolean compress;
    private boolean multiThread;

    private String deleteBy;

    private String indexType;

    private boolean ignoreWriteError;
    private Boolean isIgnoreParseError;

    private String mode;
    private String alias;

    private String aliasMode;

    private Long version;

    private Integer esVersion;

    private String masterTimeout;

    private Map<String, Object> settings;

    private List<String> includeSettingKeys;

    private String primaryKeyInfo;
    private String esPartitionColumn;

    private boolean dynamic;
    private String dstDynamic;
    private String discoveryFilter;
    private boolean versioning;
    private boolean hasId;

    private Integer maxTotalConnection;


    public Boolean getEnableWriteNull() {
        return enableWriteNull;
    }

    public void setEnableWriteNull(boolean enableWriteNull) {
        this.enableWriteNull = enableWriteNull;
    }

    public boolean getTruncate() {
        return truncate;
    }

    public void setTruncate(boolean truncate) {
        this.truncate = truncate;
    }

    public boolean getDiscovery() {
        return discovery;
    }

    public void setDiscovery(boolean discovery) {
        this.discovery = discovery;
    }

    public boolean getCompress() {
        return compress;
    }

    public void setCompress(boolean compress) {
        this.compress = compress;
    }

    public boolean getMultiThread() {
        return multiThread;
    }

    public void setMultiThread(boolean multiThread) {
        this.multiThread = multiThread;
    }

    public boolean getIgnoreWriteError() {
        return ignoreWriteError;
    }

    public void setIgnoreWriteError(boolean ignoreWriteError) {
        this.ignoreWriteError = ignoreWriteError;
    }

    public Boolean getIgnoreParseError() {
        return isIgnoreParseError;
    }

    public void setIgnoreParseError(Boolean ignoreParseError) {
        isIgnoreParseError = ignoreParseError;
    }

    public boolean getDynamic() {
        return dynamic;
    }

    public void setDynamic(boolean dynamic) {
        this.dynamic = dynamic;
    }

    public boolean getVersioning() {
        return versioning;
    }

    public void setVersioning(boolean versioning) {
        this.versioning = versioning;
    }

    public boolean getGreaterOrEqualThan7() {
        return isGreaterOrEqualThan7;
    }

    public void setGreaterOrEqualThan7(boolean greaterOrEqualThan7) {
        isGreaterOrEqualThan7 = greaterOrEqualThan7;
    }

    public boolean getHasId() {
        return hasId;
    }

    public void setHasId(boolean hasId) {
        this.hasId = hasId;
    }

    public boolean getEnableRedundantColumn() {
        return enableRedundantColumn;
    }

    public void setEnableRedundantColumn(boolean enableRedundantColumn) {
        this.enableRedundantColumn = enableRedundantColumn;
    }
}
